package com.chrray.position.domain;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.chrray.position.enums.YesNoEnum;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.*;
import java.util.Date;
import java.util.List;

/**
 * 用户资质证书 对象
 *
 * @author wusiwee
 * @email wusiwee@163.com
 * @since 1.0.1 2024-08-07
 */

@Data
@ApiModel(description = "用户资质证书")
@TableName("fd_user_cert")
public class FdUserCert extends Model<FdUserCert> {
	@TableId(type = IdType.AUTO)
	private Long id;

	private Long userId;

	private String certificateName;

	private Date issueDate;

	private Integer sort;

	private Date createTime;

	private Integer delFlag;

	public static List<FdUserCert> findByUserId(Long userId) {
		LambdaQueryWrapper<FdUserCert> queryWrapper = new LambdaQueryWrapper<>();
		queryWrapper.eq(FdUserCert::getUserId, userId);
		return new FdUserCert().selectList(queryWrapper);
	}
}
